local lockey = KEYS[1]
local hashkey = ARGV[1]

local value =tonumber(redis.call('hget', lockey, hashkey))

if value < 1 then
    redis.call('hset', lockey, hashkey, 1) -- 1 代表已经售完
else
    redis.call('hset', lockey, hashkey, value + 1)
end
